import React, { useState } from 'react'


export default function App() {
  const [count, setCount] = useState(0)
  const [isHot, setIsHot] = useState(true)

  const setCountHandle = () => {
    setCount(count + 1)
  }

  const setIsHotHandle = () => {
    setIsHot(!isHot)
  }

  return (
    <div>
      <h1>累加的值是:{count}</h1>
      <h2>天气真的{isHot ? "热啊" : "冷啊"}</h2>
      <button onClick={setCountHandle}>点击累加</button>
      <button onClick={setIsHotHandle}>点击切换天气</button>
    </div>
  )
}
